package com.tencet.service.Impl;

import com.tencet.dao.AccountTwoDAO;
import com.tencet.dao.impl.AccountTwoDAOImpl;
import com.tencet.entity.AccountTwo;
import com.tencet.service.AccountTwoService;

/**
 * @author: Fame
 * @date: 2022-07-20 16:30
 * @description:
 */
public class AccountTwoServiceImpl implements AccountTwoService {
    private AccountTwoDAO accountTwoDAO = new AccountTwoDAOImpl();
    @Override
    public AccountTwo getBeanById(String id) {
        return accountTwoDAO.getAccountTwoById(id);
    }

    @Override
    public int addBean(AccountTwo accountTwo) {
        return accountTwoDAO.insertBean(accountTwo);
    }

    @Override
    public int getBalance(String card_num2) {
        return accountTwoDAO.getBalance(card_num2);
    }

    @Override
    public int addBalance(Integer sum, String card_num) {
        return accountTwoDAO.addBalance(sum,card_num);
    }

    @Override
    public String getId(String card_num) {
        return accountTwoDAO.getIdByCardNum(card_num);
    }
}
